package com.example.yin.service;

import com.example.yin.domain.Captcha;
import com.example.yin.utils.CaptchaUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Service;

import java.awt.image.BufferedImage;
import java.util.UUID;
import java.util.concurrent.TimeUnit;


public interface CaptchaService {
    /**
     * 校验验证码
     * @param
     * @param
     * @return boolean
     **/
    public boolean isBlank(String str);
    public String checkImageCode(String imageKey, String imageCode) ;
    /**
     * 缓存验证码，有效期15分钟
     * @param key
     * @param code
     **/
    public void saveImageCode(String key, String code) ;
    /**
     * 获取验证码拼图（生成的抠图和带抠图阴影的大图及抠图坐标）
     **/
    public Object getCaptcha(Captcha captcha) ;
}
